# 情况1：可变嵌套不可变
import copy
from traceback import print_tb

a = [1,2,3,(4,5)]
b = copy.copy(a)
c = copy.deepcopy(a)
print(id(a))
print(id(b))
print(id(c))
print('----------------')
print(id(a[3]))
print(id(b[3]))
print(id(c[3]))

print('###################')
# 情况2：不可变嵌套可变
a1 = (1,2,3,[4,5])
b1 = copy.copy(a1)
c1 = copy.deepcopy(a1)

print(id(a1))
print(id(b1))
print(id(c1))
print('------------------')
print(id(a1[3]))
print(id(b1[3]))
print(id(c1[3]))